import React, { Component } from 'react'
import { Layout } from 'antd'

import { BrowserRouter as Router, Switch, Redirect, Route, Link } from 'react-router-dom'

import CommonHeader from '@component/header/index.jsx'
import CommonFooter from '@component/footer/index.jsx'
import NavBar from '@component/navbar/index.jsx'
import CommonBreadcrumb from '@component/breadcrumb/index.jsx'

import styles from './index.css'

const { Content } = Layout;

export default class ManagerWrapper extends Component {
  constructor(props) {
    super(props)
  }

  logout(e) {
    this.props.history.replace('/login')
  }

  render() {
    return (
      <Layout>
        <CommonHeader logout={e => this.logout(e)} />
        <Layout className={styles.layout}>
          <NavBar/>
          <Layout className={styles.container}>
            <CommonBreadcrumb />
            <Content className={styles.content}>
            123
              {/* <Router>
                <Switch>
                  <Route path='/manager/test1' component={Test1} />
                  <Route path='/manager/test2' component={Test2} />
                  <Redirect from='/' to='/manager/test1' />
                </Switch>
              </Router> */}
            </Content>
          </Layout>
        </Layout>
        <CommonFooter />
      </Layout>
    )
  }

}